var express = require('express');
var router = express.Router();

const { addStudents, getStudents, deleteStudents, getStudentsById, updateStudents } = require('../controllers/studentsControllers')

// 获取所有（部分）
router.get('/', getStudents);
// 根据 id 获取一个学生
router.get('/:_id', getStudentsById);


router.post('/addStudents', addStudents);

router.delete('/', deleteStudents);

router.post('/updateStudents', updateStudents);

module.exports = router;
